package net.sk.china.platform.service;

import net.sk.china.platform.request.AdminLoginRequest;
import net.sk.china.platform.request.ValidateCodeRequest;
import net.sk.china.platform.request.system.AdminResponse;
import net.sk.china.platform.response.system.LoginResponse;
import net.sk.china.platform.utils.MenusResponse;

import java.util.List;
import java.util.Map;

/**
 * +----------------------------------------------------------------------
 * // | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * // +----------------------------------------------------------------------
 * // | Copyright (c) 2018-2024 聊来 All rights reserved.
 * // +----------------------------------------------------------------------
 * // | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * // +----------------------------------------------------------------------
 * // | @Author: 聊来 <18970881148@qq.com>
 * // +----------------------------------------------------------------------
 * // | DateTime: 2024/6/3 9:51
 * // +----------------------------------------------------------------------
 */
public interface AdminService {

    /**
     * 登录
     * @param request 请求数据
     * @param ip 登录IP
     * @return {@code LoginResponse}
     */
    LoginResponse login(AdminLoginRequest request, String ip);

    /**
     * 获取登录相关数据
     * @return {@code Map<String, Object>}
     */
    Map<String, Object> getLoginPic();

    /**
     * 获取图片验证码
     * @return {@code ValidateCodeRequest}
     */
    ValidateCodeRequest getValidateCode();

    /**
     * 退出登录
     * @return {@code boolean}
     */
    boolean logout();

    /**
     * 根据Token获取对应用户信息
     * @return {@code AdminResponse}
     */
    AdminResponse getInfoByToken();


    /**
     * 获取管理员可访问目录
     * @return {@code List<MenusResponse>}
     */
    List<MenusResponse> getMenus();
}
